import request from './request'
// import { Service } from './http'

export function gethotlist () {
  return request({
    url: '/get_cate_tuijian',
    method: 'post'
  })
}
export function getcate () {
  return request({
    url: '/get_cate',
    method: 'post'
  })
}
export function getcateLlist (cateid, search) {
  return request({
    url: '/get_cate_list',
    method: 'post',
    data: {
      cate_id: cateid,
      search: search
    }
  })
}
export function getnewsban () {
  return request({
    url: '/get_banner',
    method: 'post'
  })
}
export function getdetail (id) {
  return request({
    url: '/get_cate_list_content',
    method: 'post',
    data: {
      list_id: id,
      uid: localStorage.getItem('uid')
    }
  })
}
export function getreviewList (id) {
  return request({
    url: '/get_pinglun',
    method: 'post',
    data: {
      wz_id: id
    }
  })
}
export function addpinglun (wzid, uid, content, parentid) {
  return request({
    url: '/set_pinglun',
    method: 'post',
    data: {
      wz_id: wzid,
      uid,
      content,
      parent_id: parentid
    }
  })
}
export function reviewZan (wzid, id) {
  return request({
    url: '/set_dz',
    method: 'post',
    data: {
      wz_id: wzid,
      uid: localStorage.getItem('uid'),
      id
    }
  })
}
export function onlike (uid, wzid, type) {
  return request({
    url: '/set_scang',
    method: 'post',
    data: {
      uid,
      wz_id: wzid,
      type
    }
  })
}
